'''
# -*- coding:utf-8 -*-
# @Project: DevOps_api
# @Date: 2023/3/19 - 21:18
# @Author: ysg
# @Describe: 

serializer.py
'''
from rest_framework import serializers
from variable.models import System_variable


class VariableModelSerializerr(serializers.ModelSerializer):
    var_name = serializers.CharField(max_length=128)

    class Meta:
        model = System_variable
        fields = ['id', 'var_lable', 'var_name', 'var_value', 'edit_user', 'edit_time', 'var_group', 'edit_user_name']
        extra_kwargs = {
            'edit_user_name': {'read_only': True}
        }
